package com.yunhe.merchants.service;

import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.model.mybatis.PageResult;
import com.yunhe.merchants.domain.DataPlanProject;
import com.yunhe.merchants.model.DataPlanProjectCondition;
import com.yunhe.merchants.model.DataProjectUpload;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * 策划库
 * @author hetao
 * @date 2021/05/10
 */
public interface IDataPlanProjectService {


    /**
     * 删除
     */
    public void deleteDataPlanProject(List<String> ids) throws ArgumentErrorException;

    /**
     * 通过条件查询策划库数据
     * @param dataPlanProjectCondition
     * @return
     */
    PageResult findPlansByCondition(DataPlanProjectCondition dataPlanProjectCondition) throws ArgumentErrorException;

    /**
     * 新增策划库信息
     * @param dataPlanProject
     * @return
     */
    DataPlanProject createPlan(DataPlanProject dataPlanProject) throws ArgumentErrorException;

    /**
     * 通过id查看策划库信息
     * @param id
     * @return
     */
    DataPlanProject getDataPlanPorjectById(String id);

    /**
     * 策划库批量导入
     * @param file
     */
    void uploadPlans(MultipartFile file) throws ArgumentErrorException, IOException;

    void upload(List<DataProjectUpload> dataProejctUploads , Long userId, Long orgId, String dataType);

    /**
     * 策划库导出
     * @param ids
     * @param dataPlanProjectCondition
     * @return
     */
    List<DataPlanProject> exportPlans(String ids, DataPlanProjectCondition dataPlanProjectCondition) throws ArgumentErrorException;

    /**
     * 编辑策划库数据
     * @param id
     * @param dataPlanProject
     * @return
     */
   void editPlans(String id, DataPlanProject dataPlanProject);

    void updateDataPlanProject(List<String> ids, String companyStatus,  Long deptId, Long salesman) throws ArgumentErrorException;

    void updateKnockBackStatusById(String firstSource) throws ArgumentErrorException;
}
